<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        function fn(n){
            var rel = 1;
            for(var i=1; i<=n; i++){
                rel = rel*i
            }
        return rel;       
        }
        console.log(fn(4));
        function fn1(n){
            if(n==1){
                return 1;
            }
            return n*fn(n-1);
        }
        document.write(fn(100));
    </script>
</body>
</html>